﻿using System.ComponentModel.DataAnnotations;
using ContactManagement.App_GlobalResources;
using ContactManagement.AppCode.CustomAttributes;

namespace ContactManagement.Models
{
    /// <summary>
    /// Passwort vergessen Model.
    /// </summary>
    public class ForgottenPasswordModel
    {
        [Required]
        [Display(Name = "LoginnameRESX", ResourceType = typeof(AccountViews))]
        [RegularExpression(WebConstants.EmailRegularExpString, ErrorMessageResourceName = "InvalidEMailAddressRESX", ErrorMessageResourceType = typeof(SystemMessages))]
        [CheckUserExistsPasswordRecovery(ErrorMessageResourceName = "UserDontExistsErrorRESX", ErrorMessageResourceType = typeof(SystemMessages))]
        public string UserName { get; set; }
    }
}